<?php
/**
 *UserLogController
 * @author tan bing
 * @date 2021-08-13 14:55
 */


namespace Modules\User\Http\Controllers\Admin;


use Modules\User\Services\Admin\UserServices;

class UserLogController extends AdminBaseController
{

    /**
     * @var UserServices
     * @author tan bing
     */
    private $userServices;

    /**
     * UserLogController constructor.
     *
     * @param UserServices $userServices
     * @author tan bing
     * @date 2021-08-13 15:09
     */
    public function __construct(UserServices $userServices)
    {
        $this->userServices = $userServices;
        parent::__construct();
    }

    /**
     * 用户日志记录页面.
     *
     * @return \Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
     * @author tan bing
     * @date 2021-08-13 15:06
     */
    public function index()
    {
        return view('user::admin.user_log.index');
    }

    /**
     * 获取用户日志记录.
     *
     * @return array
     * @author tan bing
     * @date 2021-08-13 11:10
     */
    public function getUserLog()
    {
        $result = $this->userServices->getUserLogPageData();
        return $this->success($result);
    }
}